package com.wx.service.impl;

import com.wx.domain.dto.SysMenuDto;
import com.wx.entity.SysAuthority;
import com.wx.entity.SysRoleAuthority;
import com.wx.mapper.SysRoleAuthorityMapper;
import com.wx.service.SysRoleAuthorityService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>Title:      RoleAuthorityServiceImpl. </p>
 * <p>Description TODO </p>
 * <p>Copyright: Copyright (c) 2016</p>
 * <p>Company:     医百科技有限公司</p>
 *
 * @author         <a href="xinglinglove1029@163.com"/>杨文生</a>
 * @since      2019/8/14 22:09
 */
@Service
public class SysRoleAuthorityServiceImpl extends BaseServiceImpl<SysRoleAuthority> implements SysRoleAuthorityService {

    @Resource
    private SysRoleAuthorityMapper roleAuthorityMapper;

    @Override
    public int batchDeleteByRoleId(String roleId) {
        return roleAuthorityMapper.batchDeleteByRoleId(roleId);
    }

    @Override
    public List<SysAuthority> getAuthorityByRoleIds(List<String> roleIds) {
        return roleAuthorityMapper.getAuthorityByRoleIds(roleIds);
    }

    @Override
    public List<SysRoleAuthority> selectRoleAuthorityByRoleId(String roleId) {
        return roleAuthorityMapper.selectRoleAuthorityByRoleId(roleId);
    }

    @Override
    public List<String> getBindRoleListByActionId(String actionId) {
        return roleAuthorityMapper.getBindRoleListByActionId(actionId);
    }

    @Override
    public int deleteByActionId(String actionId) {
        return roleAuthorityMapper.deleteByActionId(actionId);
    }

    @Override
    public int batchInsert(List<SysRoleAuthority> roleAuthorities) {
        return roleAuthorityMapper.batchInsert(roleAuthorities);
    }
}
